/**
 * 论坛UI样式 - 奶油风格设计
 * 基于参考设计重构
 */

/* 导入Font Awesome图标库 */
@import url('');

/* CSS变量定义 */
:root {
  --phone-gradient: linear-gradient(135deg, #fde4ea 0%, #f6f3ef 100%);
  --screen-bg: #fcfaf7;
  --card-bg: #ffffff;
  --modal-bg: #ffffff;
  --accent-pink: #e8a0bf;
  --accent-green: #a5bda4;
  --accent-gold: #e1c195;
  --text-primary: #5c554e;
  --text-secondary: #8f8a82;
  --text-light: #b8b2a9;
  --border-color: #f1ede8;
  --shadow-color: rgba(184, 169, 154, 0.15);
  --avatar-gradient-1: linear-gradient(to top, #fad0c4 0%, #ffd1ff 100%);
  --avatar-gradient-2: linear-gradient(120deg, #d4fc79 0%, #96e6a1 100%);
  --avatar-gradient-3: linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);

  /* 新增头像颜色 */
  --avatar-color-1: #b28cb9;
  --avatar-color-2: #e2b3d4;
  --avatar-color-3: #f7d1e6;
  --avatar-color-4: #d49ec2;
  --avatar-color-5: #f3c6d7;
  --avatar-color-6: #ec97b7;
  --avatar-color-7: #d66a88;
  --avatar-color-8: #b74d66;
  --avatar-color-9: #e3d6a7;
  --avatar-color-10: #c8ac6d;
  --avatar-color-11: #a0d8e1;
  --avatar-color-12: #2e8b9b;
  --avatar-color-13: #1a6369;
  --avatar-color-14: #0e3d45;
  --avatar-color-15: #6ba1e1;
  --avatar-color-16: #1f5e8d;
  --avatar-color-17: #b7d3a8;
  --avatar-color-18: #3e7b41;
  --avatar-color-19: #f9e79f;
  --avatar-color-20: #a3b4e2;
}

/* 论坛应用主容器 */
.forum-app {
  height: 100%;
  background: var(--screen-bg);
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

.post-time {
  display: none !important;
}

.forum-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.post-button,
.refresh-button,
.forum-control-button {
  background: rgba(255, 255, 255, 0.9);
  color: #4e7ce8;
  border: none;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.post-button:hover,
.refresh-button:hover {
  background: white;
  transform: scale(1.05);
}

/* 论坛内容区域 */
.forum-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width:100%
}

.forum-content::-webkit-scrollbar {
  display: none;
}

/* 空状态 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
  text-align: center;
  color: var(--text-light);
  padding: 20px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.empty-text {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.empty-hint {
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.5;
  color: var(--text-light);
}

.generate-forum-btn {
  background: linear-gradient(135deg, var(--accent-pink) 0%, var(--accent-gold) 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px var(--shadow-color);
}

.generate-forum-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--shadow-color);
}

/* 帖子卡片样式 - 基于参考设计 */
.thread-item {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 12px;
  cursor: pointer;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 15px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.thread-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px var(--shadow-color);
}

.thread-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.thread-author {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}

.author-avatar {
  width: clamp(24px, 6vw, 32px);
  height: clamp(24px, 6vw, 32px);
  border-radius: 50%;
  background: var(--avatar-gradient-1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(9px, 2.5vw, 12px);
  font-weight: 600;
}

.author-avatar.large {
  width: 48px;
  height: 48px;
  font-size: 18px;
}

.author-name {
  font-weight: bold;
  font-size: 13px;
  color: var(--text-primary);
}

.thread-id {
  background-color: var(--border-color);
  color: var(--text-light);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 99px;
  font-weight: 500;
  margin-left: auto;
}

.thread-time {
  display: none !important;
}

.thread-title {
  font-size: clamp(13px, 3.5vw, 15px);
  margin-bottom: 2px;
  color: var(--text-primary);
  line-height: 1.2;
  font-weight: 600;
}

.thread-content {
  font-size: clamp(11px, 3vw, 13px);
  line-height: 1.3;
  color: var(--text-secondary);
  margin-bottom: 0px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.thread-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.thread-actions {
  display: flex;
  gap: 25px;
  color: var(--text-secondary);
}

.thread-action-btn,
.action-btn {
  background: none;
  border: none;
  color: inherit;
  font-size: clamp(10px, 2.8vw, 12px);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: clamp(2px, 1vw, 4px);
  transition: color 0.3s ease;
}

.thread-action-btn:hover,
.action-btn:hover {
  color: var(--accent-pink);
}

.action-btn.liked {
  color: var(--accent-pink);
}

/* 帖子详情页面 */
.thread-detail {
  background: var(--screen-bg);
  min-height: 100%;
  overflow-y: auto;
  padding: 8px;
}

.main-post {
  padding: 0;
  margin-bottom: 6px;
}

.post-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.author-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.post-meta {
  margin-bottom: 2px;
}

.post-full-content {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  white-space: pre-wrap;
  padding-bottom: 4px;
}

.post-actions {
  display: flex;
  gap: 15px;
  color: var(--text-secondary);
  padding-bottom: 4px;
}

/* 评论输入框样式 */
.comment-input-bar {
  padding: 12px 8px;
  background: var(--screen-bg);
  border-top: 1px solid var(--border-color);
  display: none; /* 默认隐藏 */
  align-items: center;
  gap: 8px;
  margin-top: auto;
  position: sticky;
  bottom: 0;
  transition: all 0.3s ease;
}

.comment-input-bar.show {
  display: flex; /* 显示状态 */
}

.comment-input-bar input {
  flex-grow: 1;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  padding: 8px 12px;
  border-radius: 99px;
  font-size: 13px;
  color: var(--text-primary);
}

.comment-input-bar input:focus {
  outline: none;
  border-color: var(--accent-pink);
}

.post-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
  line-height: 1.4;
}

.post-content {
  font-size: 13px;
  color: #333;
  line-height: 1.6;
  margin-bottom: 4px;
}

.post-actions {
  display: flex;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}

.action-btn {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  color: #666;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.action-btn:hover {
  background: #e9ecef;
  border-color: #dee2e6;
}

.action-btn.like:hover {
  background: #fff5f5;
  border-color: #fed7d7;
  color: #e53e3e;
}

.action-btn.reply:hover {
  background: #f0f7ff;
  border-color: #d6e4ff;
  color: #4e7ce8;
}

/* 回复列表 */
.reply-list {
  background: var(--screen-bg);
}

.comments-section h3 {
  font-size: 14px;
  font-weight: 600;
  padding: 6px 0 4px;
  border-top: 1px solid var(--border-color);
  color: var(--text-primary);
}

/* 评论项样式 */
.comment-item {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
      flex-wrap: wrap;
}

.comment-avatar {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--avatar-gradient-2);
}

.comment-body {
  flex-grow: 1;
}

.comment-author {
  font-weight: bold;
  font-size: 12px;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.comment-content {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.comment-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
  font-size: 11px;
  color: var(--text-light);
}

.comment-thread {
  margin-top: 8px;
  padding-left: 12px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-thread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3px;
  width: 2px;
  height: calc(100% - 6px);
  background: linear-gradient(to bottom, #d8cff8, #f5d4e1, #fedcbd);
  border-radius: 2px;
}

.reply-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
}

.reply-header h4 {
  margin: 0;
  font-size: 16px;
  color: #333;
}

.no-replies {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #999;
}

.no-replies-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.no-replies-text {
  font-size: 14px;
}

.reply-item {
  padding: 4px 2px;
  border-bottom: 1px solid #f8f9fa;
  transition: background-color 0.3s ease;
}

.reply-item:hover {
  background: #fafbfc;
}

.reply-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
  background: none;
  border: none;
}

.reply-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.author-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.reply-time {
  font-size: 10px;
  color: var(--text-light);
  line-height: 1;
}

.reply-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #999;
}

.floor-number {
  color: #4e7ce8;
  font-weight: 600;
}

.reply-content {
  font-size: 14px;
  color: #333;
  line-height: 1.6;
  margin-bottom: 12px;
  padding-left: 32px;
}

.reply-actions {
  display: flex;
  gap: 8px;
  padding-left: 0;
}

.action-btn.like-reply,
.action-btn.reply-to-reply {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 12px;
}

/* 回复输入框 */
.reply-input-container {
  background: white;
  border-top: 8px solid #f5f5f5;
  position: sticky;
  bottom: 0;
}

.reply-input-box {
  padding: 10px 10px;
  border-top: 1px solid #f0f0f0;
  display: flex;
}

.reply-input {
  width: 100%;
  min-height: 60px;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  resize: vertical;
  transition: border-color 0.3s ease;
  background: #fafbfc;
}

.reply-input:focus {
  outline: none;
  border-color: #4e7ce8;
  background: white;
  box-shadow: 0 0 0 2px rgba(78, 124, 232, 0.1);
}

.reply-actions {
  display: flex;
  justify-content:space-around;
  align-items: center;
  margin-top: 0;
  margin-left: 10px;
}

.emoji-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: background-color 0.3s ease;
}

.emoji-btn:hover {
  background: #f0f0f0;
}

.submit-reply-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 8px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.submit-reply-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 发帖对话框 */
.post-dialog {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.dialog-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.dialog-content {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
}

.dialog-header h3 {
  margin: 0;
  font-size: 18px;
  color: #333;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: #f0f0f0;
  color: #666;
}

.dialog-body {
  padding: 24px;
}

.post-title-input {
  width: 100%;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 16px;
  margin-bottom: 16px;
  transition: border-color 0.3s ease;
}

.post-title-input:focus {
  outline: none;
  border-color: #4e7ce8;
  box-shadow: 0 0 0 2px rgba(78, 124, 232, 0.1);
}

.post-content-input {
  width: 100%;
  min-height: 120px;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  resize: vertical;
  transition: border-color 0.3s ease;
}

.post-content-input:focus {
  outline: none;
  border-color: #4e7ce8;
  box-shadow: 0 0 0 2px rgba(78, 124, 232, 0.1);
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid #f0f0f0;
  background: #fafbfc;
}

.cancel-btn,
.submit-btn {
  padding: 10px 24px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cancel-btn {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  color: #666;
}

.cancel-btn:hover {
  background: #e9ecef;
}

.submit-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
}

.submit-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 内容格式化 */
.emoji-placeholder {
  background: #ffe4e1;
  color: #e53e3e;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.forum-link {
  color: #4e7ce8;
  text-decoration: none;
}

.forum-link:hover {
  text-decoration: underline;
}

.mention {
  color: #4e7ce8;
  font-weight: 600;
}

/* 动画效果 */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.slide-in {
  animation: slideIn 0.3s ease-out;
}

/* 响应式设计 */
@media (max-width: 480px) {
  /* 论坛内容区域 */
  .forum-content {
    padding: 6px;
    gap: 3px;
  }

  /* 帖子卡片 */
  .thread-item {
    padding: 10px;
    border-radius: 14px;
  }

  .author-avatar {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }

  .author-avatar.large {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .author-name {
    font-size: 12px;
  }

  .thread-title {
    font-size: 14px;
  }

  .thread-content {
    font-size: 12px;
    -webkit-line-clamp: 2;
  }

  .thread-id {
    font-size: 9px;
    padding: 2px 6px;
  }

  .action-btn {
    font-size: 11px;
  }

  /* 帖子详情页 */
  .thread-detail {
    padding: 6px;
  }

  .post-title {
    font-size: 15px;
  }

  .post-full-content {
    font-size: 13px;
  }

  /* 评论相关 */
  .comment-avatar {
    width: 24px;
    height: 24px;
  }

  .comment-author {
    font-size: 11px;
  }

  .comment-content {
    font-size: 12px;
  }

  /* 评论输入框 */
  .comment-input-bar {
    padding: 8px 6px;
  }

  .comment-input-bar input {
    padding: 6px 10px;
    font-size: 12px;
  }
}

/* 平板设备响应式 */
@media (max-width: 768px) and (min-width: 481px) {
  .forum-content {
    padding: 14px;
    gap: 14px;
  }

  .thread-item {
    padding: 18px;
  }

  .author-avatar {
    width: 42px;
    height: 42px;
  }

  .thread-title {
    font-size: 17px;
  }

  .thread-content {
    font-size: 13.5px;
  }
}

/* 大屏幕优化 */
@media (min-width: 769px) {
  .forum-content {
    max-width: 800px;
    margin: 0 auto;
  }

  .thread-item:hover {
    transform: translateY(-3px);
  }
}

/* 点赞动画效果 */
@keyframes heartFloat {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  50% {
    opacity: 0.8;
    transform: translateY(-20px) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translateY(-40px) scale(0.8);
  }
}

/* 点赞按钮样式 */
.action-btn.liked {
  background-color: rgba(231, 76, 60, 0.1);
  border-color: #e74c3c;
  color: #e74c3c;
}

.action-btn.liked i {
  color: #e74c3c !important;
}

.action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.action-btn:active {
  transform: translateY(0);
}

/* 点赞按钮过渡效果 */
.action-btn {
  transition: all 0.2s ease;
}

.action-btn i {
  transition: color 0.2s ease;
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  .forum-app {
    background: #1a1a1a;
    color: #e0e0e0;
  }

  .thread-item {
    background: #2d2d2d;
    border-color: #404040;
  }

  .thread-title {
    color: #e0e0e0;
  }

  .thread-content {
    color: #b0b0b0;
  }

  .main-post,
  .thread-detail {
    background: #2d2d2d;
  }

  .post-title {
    color: #e0e0e0;
  }

  .post-content {
    color: #e0e0e0;
  }

  .reply-item:hover {
    background: #3a3a3a;
  }

  .reply-input {
    background: #3a3a3a;
    border-color: #555;
    color: #e0e0e0;
  }

  .dialog-content {
    background: #2d2d2d;
  }

  .post-title-input,
  .post-content-input {
    background: #3a3a3a;
    border-color: #555;
    color: #e0e0e0;
  }

  .sub-replies-container {
    background: #3a3a3a;
    border-color: #555;
  }

  .sub-reply-item {
    background: #2d2d2d;
    border-color: #404040;
  }

  .sub-reply-input-box {
    background: #3a3a3a;
    border-color: #555;
  }

  .sub-reply-input {
    background: #eee !important;
    border-color: #404040;
    color: #e0e0e0;
  }

  .sub-reply-target {
    color: #b0b0b0;
  }
}

/* 楼中楼样式 */
.sub-replies-container {
  margin-top: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 3px solid #4e7ce8;
}

.sub-replies-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e9ecef;
}

.sub-replies-count {
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

.sub-replies-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sub-reply-item {
  padding: 8px 12px;
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.sub-reply-item:hover {
  background: #f1f3f5;
  border-color: #4e7ce8;
}

.sub-reply-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.author-avatar.small {
  width: 24px;
  height: 24px;
  font-size: 10px;
}

.sub-reply-time {
  font-size: 11px;
  color: #999;
  margin-left: auto;
  display: none !important;
}

.sub-reply-content {
  font-size: 13px;
  line-height: 1.5;
  color: #333;
  margin-bottom: 6px;
}

.sub-reply-actions {
  display: flex;
  gap: 8px;
}

.action-btn.like-sub-reply,
.action-btn.reply-to-sub-reply {
  font-size: 11px;
  padding: 4px 8px;
  background: #f1f3f5;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
}

.action-btn.like-sub-reply:hover,
.action-btn.reply-to-sub-reply:hover {
  background: #e9ecef;
  color: #4e7ce8;
}

/* 楼中楼回复输入框 */
.sub-reply-input-container {
  margin-top: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.sub-reply-input-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sub-reply-target {
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

.sub-reply-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  font-size: 13px;
  resize: vertical;
  min-height: 60px;
  transition: all 0.3s ease;
}

.sub-reply-input:focus {
  outline: none;
  border-color: #4e7ce8;
  box-shadow: 0 0 0 2px rgba(78, 124, 232, 0.1);
}

.sub-reply-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.cancel-sub-reply-btn,
.submit-sub-reply-btn {
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cancel-sub-reply-btn {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  color: #666;
}

.cancel-sub-reply-btn:hover {
  background: #e9ecef;
}

.submit-sub-reply-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
}

.submit-sub-reply-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* 楼中楼响应式调整 */
@media (max-width: 480px) {
  .sub-replies-container {
    padding: 8px;
    margin-top: 8px;
  }

  .sub-reply-item {
    padding: 6px 8px;
  }

  .sub-reply-input-container {
    padding: 8px;
  }

  .sub-reply-input {
    padding: 6px 8px;
    font-size: 12px;
  }

  .cancel-sub-reply-btn,
  .submit-sub-reply-btn {
    padding: 4px 8px;
    font-size: 11px;
  }
}

/* 删除按钮样式 */
.delete-btn.forum-delete-btn {

  top: 10px;
  right: 10px;
  background: #9ca3af;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.delete-btn.forum-delete-btn:hover {
  background: #6b7280;
  transform: scale(1.05);
}

.delete-btn.forum-delete-btn:active {
  transform: scale(0.95);
}

/* 确保thread-header有相对定位以便删除按钮绝对定位 */
.thread-header {
  position: relative;
}
